package com.waiting.list;

import java.util.TreeSet;

/**
 * @Description
 * @Author bjweitingting
 * @Date 2019/2/15
 **/
public class TreeSetTest {
    public static void main(String[] args) {
        TreeSet<Integer> treeSetTest = new TreeSet<>();
        //乱序存入
        treeSetTest.add(100);
        treeSetTest.add(200);
        treeSetTest.add(50);
        //根据大小，有序输出
        for (Integer item : treeSetTest) {
            System.out.println(item);
        }
    }
}
